<!-- Modal -->
<div class="modal-dialog wide" style="width: 550px;">
<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">
            <#if xcOpen??>
                <#if xcOpen.id??>
                    编辑
                <#else>
                    新增
                </#if>
            </#if>
        </h4>
    </div>
    <div class="modal-body">
        <div id="errorMessage"><#include "../../message.ftl" /></div>
        <form class="form-horizontal" role="form" id="xcOpenForm" method="post" action="${absoluteContextPath}/xc/xcOpen/save">
            <#if xcOpen??>
                <#if xcOpen.id??>
                    <input type="hidden" name="id" value="${xcOpen.id}"/>
                <#else>
                    <input type="hidden" name="id" value=""/>
                </#if>
            </#if>
            <div class="row">
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="id" value="${xcOpen.id!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">操作员</label>
                <div class="col-sm-6">
                    <input name="operator" value="${xcOpen.operator!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">开单人</label>
                <div class="col-sm-6">
                    <input name="person" value="${xcOpen.person!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">F0</label>
                <div class="col-sm-6">
                    <input name="f0" value="${xcOpen.f0!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">F501</label>
                <div class="col-sm-6">
                    <input name="f501" value="${xcOpen.f501!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">F1501</label>
                <div class="col-sm-6">
                    <input name="f1501" value="${xcOpen.f1501!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">F2901</label>
                <div class="col-sm-6">
                    <input name="f2901" value="${xcOpen.f2901!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">应开金额</label>
                <div class="col-sm-6">
                    <input name="openMoney" value="${xcOpen.openMoney!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">人数小计</label>
                <div class="col-sm-6">
                    <input name="openSum" value="${xcOpen.openSum!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">空人数</label>
                <div class="col-sm-6">
                    <input name="emptyNumber" value="${xcOpen.emptyNumber!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">自测人数</label>
                <div class="col-sm-6">
                    <input name="healthNum" value="${xcOpen.healthNum!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">A人数</label>
                <div class="col-sm-6">
                    <input name="ANum" value="${xcOpen.ANum!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">A2人数</label>
                <div class="col-sm-6">
                    <input name="a2Num" value="${xcOpen.a2Num!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">B人数</label>
                <div class="col-sm-6">
                    <input name="BNum" value="${xcOpen.BNum!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">C人数</label>
                <div class="col-sm-6">
                    <input name="CNum" value="${xcOpen.CNum!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">D人数</label>
                <div class="col-sm-6">
                    <input name="DNum" value="${xcOpen.DNum!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">BCD金额</label>
                <div class="col-sm-6">
                    <input name="bcdMoney" value="${xcOpen.bcdMoney!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">BCD小计</label>
                <div class="col-sm-6">
                    <input name="bcdSum" value="${xcOpen.bcdSum!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">开单合格率</label>
                <div class="col-sm-6">
                    <input name="openPass" value="${xcOpen.openPass!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">开单率</label>
                <div class="col-sm-6">
                    <input name="openRate" value="${xcOpen.openRate!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">损失金额</label>
                <div class="col-sm-6">
                    <input name="lossesMoney" value="${xcOpen.lossesMoney!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">损失金额占比</label>
                <div class="col-sm-6">
                    <input name="lossesRate" value="${xcOpen.lossesRate!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label">体检日期</label>
                <div class="col-sm-6">
                    <input name="riqiStart" value="${xcOpen.riqiStart!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-4 control-label"></label>
                <div class="col-sm-6">
                    <input name="riqiEnd" value="${xcOpen.riqiEnd!''}" type="text" class="form-control"/>
                </div>
            </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button type="button" class="btn btn-primary" onclick="save();">保存</button>
    </div>
</div>
</div>
<script>
    function save() {
        $("#" + "xcOpenForm").ajaxSubmit({
            success:function(data) {
                data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $('#myModal').modal("hide");
                    $.showMessage({parentId:"showMessage",message:"信息保存成功！",type:"success"});
                    refreshTable();
                } else {
                    $.showMessage({parentId:"errorMessage",message:"<strong>错误信息</strong>：" + data.returnMsg,type:"error"});
                }
            }
        });
    }
</script>